import { Navigate } from 'react-router-dom'
import About from '@/pages/About'
import Home from '@/pages/Home'
import Page from '@/pages/Page2'
import Chart from '@/pages/Chart'
import PublishPage from "@/pages/page/PublishPage";
import Config from "@/pages/Config/PublishPage";
import Demo2 from '@/pages/Demo2'

export default [
  {
    path: '/config',
    element: <Config />,
  },
  {
    path: '/demo2',
    element: <Demo2 />,
  },
  {
    path: '/about',
    element: <About />,
  },
  {
    path: '/home',
    element: <Home />,
  },
  {
    path: '/page2',
    element: <Page />,
  },
  {
    path: '/chart',
    element: <Chart />,
  },
  {
    path: '/page',
    element: <PublishPage />,
  },
  {
    // 路由重定向
    path: '/',
    element: <Navigate to='/home' />,
  },
] as {
  path: string
  element: JSX.Element
}[]
